package com.example.staticproxy;

/**
 * Created by luhaoyuan on 2017/1/7.
 */
public class HelloProxy implements Hello {

    private Hello hello;

    public HelloProxy() {
        hello = new HelloImpl();
    }

    @Override
    public void say(String str) {
        before();
        hello.say(str);
        after();
    }

    private void after() {
        System.out.println("After");
    }

    private void before() {
        System.out.println("Before");
    }
}
